<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .fade-enter-active,
    .fade-leave-active {
      transition: opacity .5s;
    }

    .fade-enter,
    .fade-leave-to {
      opacity: 0;
    }
  </style>
</head>

<body>
  <div id="app">
    <!-- 按钮 -->
    <button v-on:click="show = !show">Toggle</button>
    <!-- 过渡组件 -->
    <transition name="fade">
      <p v-show="show">HELLO LWL</p>
    </transition>
  </div>
</body>
<script src="./node_modules/vue/dist/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      show: true
    },
    methods: {

    }
  });
</script>

</html>